import maya.cmds as cmds

def getSkinJnt():
    SkinObj = cmds.ls(sl=True)[0]
    skinCluster=cmds.listConnections(str(SkinObj)+'.inMesh',s=True)[0]
    parenconnect=cmds.listConnections(skinCluster,s=True,p=True)
    worldMatriaxAll=[]
    jntskinAll=[]
    for i in parenconnect:
        if 'worldMatrix' in i:
            worldMatriaxAll.append(i)
    for k in worldMatriaxAll:
        jntname=k.split('.')[0]
        jntskinAll.append(jntname)
    cmds.select(jntskinAll)
